package dataAcsessObject;

import entity.Professor;
import java.util.List;
import javax.persistence.EntityManager;

/**
 *
 * @author Juan Hernández Serrato
 */
public class ProfessorDAO extends AbstractDataAccessObject<Professor> {
    public ProfessorDAO(){
        super(Professor.class);
    }
    
    public List<Professor> findProfessorsByUniversityUserName(String id, EntityManager em){
        return em.createNamedQuery("ProfessorByUniversity",Professor.class)
                .setParameter("idU", id)
                .getResultList();
    }
}
